#pragma once

#include <GL/glew.h>
#include <vector>
using namespace std;

struct VertexBufferElement
{
	// glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 3, 0)
	int size; //  3
	GLenum type; // GL_FLOAT
	GLboolean normalized; // GL_FALSE


	//GLsizei stride; // 
	//int offset; // 
	//static int GetSizeOfType(GLenum type) {
	//	return sizeof(type);
	//}
};

class VertexBufferLayout
{
public:

	void PushFloat(int size) {
		m_Elements.push_back({ size,GL_FLOAT,GL_FALSE });
		m_stride += size * sizeof(GL_FLOAT);
	}

	inline unsigned int GetStride() const { return m_stride; }

	//template <typename T>
	//void Push() {
	//	static_assert(false);
	//}

	//template <typename T>
	//void Push<float>(int size) {
	//	m_Elements.push_back({ size,GL_FLOAT,GL_FALSE,0,0 });
	//}

	vector<VertexBufferElement> m_Elements;
	unsigned int m_stride = 0;


};

